reactpy.run and configure(...) refactoring#1051
reactpy.run and configure(...) refactoring#1051Archmonger merged 35 commits intoreactive-python:mainfrom
reactpy.run and configure(...) refactoring#1051Conversation
reactpy.run failuresreactpy.run refactoring
|
@rmorshea |
|
I was planning on doing a 1.0.1 release tomorrow. Should this wait for the next release? |
|
Yes, technically this release has an API change ( |
|
I discovered that our I attempted to rewrite |
reactpy.run refactoringreactpy.run and configure(...) refactoring
rmorshea
left a comment
There was a problem hiding this comment.
Generally just minor things to correct.
|
@rmorshea This seems to be mergeable, but needs approval. |
Issues
Right now
reactpy.runcan fail in fairly unpredictable ways which give little in terms of stack traces.Summary
This refactors the
reactpy.runcall stack in order allow failures that are user-readable.reactpy.backends.utils.find_all_implementations()to first try to import<backend_name>before importingreactpy.backend.<backend_name>reactpy.runto silently failuvicorndirectly withinserve_with_uvicornin order to defer import.ModuleNotFound: Could not import uvicornexception to tell the user what went wrongCommonOptions.serve_index_route: boolallow_reuse_waiting_portsparameter onfind_available_port()BackendImplementationtoBackendProtocolSUPPORTED_PACKAGESso thatFastAPIhas a chance to run beforestarletteSUPPORTED_PACKAGEStoSUPPORTED_BACKENDSreactpy.backend.*code to be more human readableifstatements where possiblecontextlib.supresswhere possiblerequirements.txtfileChecklist
changelog.rsthas been updated with any significant changes.